const target = {foo:'bar'};

const handler = {
    get (){
        return '拦截换成了car'
    }
}

const proxy = new Proxy(target,handler)

//触发get 拦截器 目标对象不变
console.log(proxy.foo);//拦截换成了car
console.log(target.foo);//bar

console.log(proxy['foo']);//拦截换成了car
console.log(target['foo']);//bar

console.log(Object.create(proxy)['foo'])//拦截换成了car
console.log(Object.create(target)['foo'])//bar
